<h1><%= title "Editing #{@character.name}" %></h1>

<% form_for(@character) do |f| %>
  <%= f.error_messages %>

  <p>
		<%= f.label :player_id %>:
		<select name="character[player_id]">
		<%= options_player_select @character.player_id %>
		</select>
  </p>
  <p>
		<%= f.label :father %>:
		<select name="character[father]">
			<%=options_male_characters @character.father%>
		</select>
		<%= f.label :mother %>:
		<select name="character[mother]">
			<%=options_female_characters @character.mother %>
		</select>
  </p>
  <p>
		<%= f.label :christian_name %>:
    	<%= f.text_field :christian_name %>
		<%= f.label :family_name %>:
    	<%= f.text_field :family_name %>
  </p>
    <p>
		<%= f.label :culture_id %>:
		<select name="character[culture_id]">
		<%= options_culture_select @character.culture_id %>
		</select>
  </p>
  <p>
		<%= f.label :honour %>:
    <%= f.text_field :honour, :size => 6 %>
 		<%= f.label :prestige %>:
    <%= f.text_field :prestige, :size => 6 %>
  		<%= f.label :piety %>:
    <%= f.text_field :piety, :size => 6 %>
 		<%= f.label :wealth %>:
    <%= f.text_field :wealth, :size => 6 %>
  </p>
  <p>
		<%= f.label :sex %>:
		<select name="character[sex]"><%= options_character_sex @character.sex %></select>
		<%= f.label :marital_status %>:
		<select name="character[marital_status]"><%= options_character_marital_status @character.marital_status %></select>
		
  </p>  <p>
		<%= f.label :dob %><br />
    <%= f.text_field :dob %>
  </p>
  <p>
		<%= f.label :diplomacy %>:
    	<%= f.text_field :diplomacy, :size => 4 %>
  	<%= f.label :martial %>:
    <%= f.text_field :martial, :size => 4 %>
  		<%= f.label :stewardship %>:
    <%= f.text_field :stewardship, :size => 4 %>
  		<%= f.label :intrigue %>:
    <%= f.text_field :intrigue, :size => 4 %>
  </p>
  <p>
		<%= f.label :loyalty %>:
    <%= f.text_field :loyalty, :size => 4 %>
  		<%= f.label :fertility %>:
    <%= f.text_field :fertility, :size => 4 %>
 		<%= f.label :health %>:
    <%= f.text_field :health, :size => 4 %>
  </p>
  <p>
    <%= f.submit "Update" %>
  </p>
<% end %>

<%= link_to 'Show', @character %> |
<%= link_to 'Back', characters_path %>